class baseResult{
    constructor(data, message){
        if(data !=null) this.data = data;
        this.messgae = message;
    }
}

class successResult extends baseResult{
    constructor(data,message){
        super(data,message)
        this.status = 200;
    }
}
class errorResult extends baseResult{
    constructor(data,message){
        super(data,message)
        this.status = 500;
    }
}

// function test(){
//     json1 = {
//         name:"hah",
//         age:11
//     }
//     let a = new successResult(json1,"niubi");
//
//     console.log(a)
// }
//
// test()

module.exports = {
    successResult,
    ErrorResult
}